The DOKK is a free database. The data is modeled as a graph, with topics represented
as nodes connected by edges.


Naming conventions
------------------

Because the graph contains a large number of nodes, it's divided into more manageable
subgraphs (one per folder).
There are no restrictions on the ID values that can be used, but in order to keep
things well organized the following conventions are adopted:

    dokk:subgraph:id
    |    |        |_____ local ID, defined within the subgraph
    |    |______________ name of the subgraph where the node is defined
    |___________________ fixed prefix


Using the graph
---------------

Files can be parsed with any RDF library. For more advanced needs the files can
be loaded in a database server (a triplestore). For this we recommend the Fuseki
server.
Following is a demonstration with Python and RDFLib:

    g = rdflib.Graph()
    g.parse("file-1")
    g.parse("file-2")
    g.parse("...")

    # Execute queries on the graph.
    # (example: find the names of the people that know Bob
    query = """
        SELECT ?name
        WHERE { ?person :knows :bob ;
                        :name  ?name . }
    """

    results = g.query(query)
    for r in results:
        print(r.name)
    
    # Or convert nodes to JSON
    graph_json = json.loads(g.serialize(format="json-ld"))


Contacts
--------

If you have problems with using the database, please consider asking your questions
on WOTAS (https://wotas.net).
If you just want to say hi!, meet us on IRC in #peers at irc.libera.chat or
https://peers.community.
